X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/ae9d78b70625763cb86e8eeaf4949d3824dc230d..6e8a139250e34cbc1c5e161bc5b27411430edd37:/AESL/TP1%2004.10%20MassOnSphere.AESL diff --git a/AESL/TP1 04.10 MassOnSphere.AESL b/AESL/TP1 04.10 MassOnSphere.AESL new file mode 100644 index 0000000..b6dfbbe --- /dev/null +++ b/AESL/TP1 04.10 MassOnSphere.AESL @@ -0,0 +1,58 @@ +IDENTIFICATION DIVISION +PROGRAM-ID MassOnSphere +VERSION 20240124 +COMMENT A mass m rests at the apex on a fixed sphere with radius a. +COMMENT With a slight displacement, it slides down the sphere without friction +COMMENT x'' = C1*x*y - C3*x +COMMENT y'' = C2*y*y - C4*y - g +COMMENT Scaling: measuring distances in da-m (10¹ m) +COMMENT Initial condition: slightly off the top of the sphere to get the mass rolling. +COMMENT Note: x0 is a function of y0 with x0² + y0² = a² +COMMENT Note: ICs have to be negative as the integrator is inverting + +ENVIRONMENT DIVISION +ENGINE Anabrid-THAT +TIMEBASE 1ms +REQUIRES COEFFICIENT 7 +REQUIRES INTEGRATOR 4 +REQUIRES MULTIPLIER 2 +REQUIRES INVERTER 4 +REQUIRES SUMMER 2 + +DATA DIVISION +OUTPUT OUTPUT.X x +OUTPUT OUTPUT.Y y +# Example values based on a=1 +COEFFICIENT.1 3g/a² for xy e.g. 2,943 +COEFFICIENT.2 3g/a² for y² +COEFFICIENT.3 2g/a for x e.g. 1,962 +COEFFICIENT.4 2g/a for y +COEFFICIENT.5 g e.g. 0,981 +COEFFICIENT.6 a initial condition y e.g. 0,957 +COEFFICIENT.7 0 initial condition x, slightly above 0 to start motion, e.g. 0,290 + +PROGRAM DIVISION +-1 -> COEFFICIENT.5 -> -g +-1 -> COEFFICIENT.6 -> -y0 +-1 -> COEFFICIENT.7 -> -x0 + +x'' -> INTEGRATOR -> -x' +-x', IC:-x0 -> INTEGRATOR -> x +y'' -> INTEGRATOR -> -y' +-y', IC:-y0 -> INTEGRATOR -> y +x,y -> MULTIPLIER -> x*y +y,y -> MULTIPLIER -> y^2 +x*y -> COEFFICIENT.1 -> 3g/a²*x*y/10 +y^2 -> COEFFICIENT.2 -> 3g/a²*y^2/10 +x -> COEFFICIENT.3 -> 2g/a*x/10 +y -> COEFFICIENT.4 -> 2g/a*y/10 +2g/a*x/10 -> INVERTER -> -2g/a*x/10 +2g/a*y/10 -> INVERTER -> -2g/a*y/10 +10:3g/a²*x*y/10, 10:-2g/a*x/10 -> SUMMER -> -x'' +-x'' -> INVERTER -> x'' +10:3g/a²*y^2/10, 10:-2g/a*y/10, 1:-g -> SUMMER -> -y'' +-y'' -> INVERTER -> y'' + +OPERATION DIVISION +MODE REPEAT +OP-TIME 24ms # after that, the mass would jump off the sphere, which is not included in this model